module.exports = {
  /** 用于验证字符串是否为“数字px”的形式 */
  preflightReg: /(?<=\d)(?:px|vw| |$)/,
  /** 用于匹配字符串形如“数字px”的字符串，不可以在 url()、单引号、双引号中
   * 
   * \d+\.\d+|\d+|\.\d+ // 匹配数字
   * 
   * url\((?:\\\(|\\\)|[^()])*\) // 匹配 url(...)
   * 
   * var\((?:\\\(|\\\)|[^(),])*\) // 匹配 var(...)，括号中不包含逗点“,”
   *
   * var\((?:\\\(|\\\)|[^(),])*, // 匹配 var(...,，匹配 var(...,，无有括号，最右边是逗点“,”
   * 
   * "(?:\\"|[^"])*" // 匹配 "..."
   * 
   * '(?:\\'|[^'])*' // 匹配 '...'
   * 
   * #(?:[a-zA-Z\d]{3}){1,2} // 匹配颜色
   */
  pxMatchReg: /(var\((?:\\\(|\\\)|[^(),])*\)|var\((?:\\\(|\\\)|[^(),])*,|url\((?:\\\(|\\\)|[^()])*\)|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|#(?:[a-zA-Z\d]{3}){1,2})|(-?(?:\d+\.\d+|\d+|\.\d+))(px| |$)/g,
  unitContentMatchReg: /(var\((?:\\\(|\\\)|[^(),])*\)|var\((?:\\\(|\\\)|[^(),])*,|url\((?:\\\(|\\\)|[^()])*\)|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|#(?:[a-zA-Z\d]{3}){1,2})|(-?(?:\d+\.\d+|\d+|\.\d+))(px|vw| |$)/g,
  fixedUnitContentReg: /(var\((?:\\\(|\\\)|[^(),])*\)|var\((?:\\\(|\\\)|[^(),])*,|url\((?:\\\(|\\\)|[^()])*\)|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|#(?:[a-zA-Z\d]{3}){1,2})|(-?(?:\d+\.\d+|\d+|\.\d+))(px|vw|%| |$)/g,
  varTestReg: /var\((?:\\\(|\\\)|[^()])*\)/,
}